package com.chen.shopping_common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.io.Serializable;


//Getter注解的作用：自动在实体类中生成get方法
@Getter
@AllArgsConstructor
public enum CodeEnum {
    SUCCESS(200,"ok"),
    SYSTEM_ERROR(500,"系统异常"),
    PARAMETER_ERROR(601,"参数错误"),
    INSERT_PRODUCTTYPE_ERROR(602,"3级父类型的商品类型无法被添加和修改"),
    DELETE_PRODUCTTYPE_ERROR(603,"含有子类型，无法被删除"),
    UPLOAD_FILE_ERROR(604,"文件上传异常"),
    REDISTRY_CODE_ERROR(605,"验证码错误，请重新输入"),
    REGISTRY_PHONE_EXIST(606,"手机号已存在"),
    REGISTRY_USERNAME_EXIST(607,"用户名已存在"),
    LOGIN_USERNAME_PASSWORD_ERROR(608,"用户名或密码错误"),
    LOGIN_CHECKCODE_ERROR(609,"验证码错误"),
    LOGIN_NOPHONE_ERROR(610,"该手机号未注册"),
    LOGIN_USER_STATUS_ERROR(611,"用户状态异常"),
    PAYMENT_QRCODE_ERROR(612,"生成二维码异常"),
    PAYMENT_CHECKSIGN_ERROR(613,"验签异常"),
    PAYMENT_QRCODE_EXIST_ERROR(614,"订单已支付"),
    NO_STOCK_ERROR(615,"库存不足"),
    SECKILL_ORDER_PAYMENT_ERROR(616,"秒杀订单支付异常")
    ;
    private final Integer code;
    private final String message;
}
